package com.supplychainapi.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

/**
 * Created by shenhong on 2017/11/13.
 */
@ApiModel("新增客户修改之前参数获取")
public class BeforeDataModelCust<T> {

    @ApiModelProperty("是否自动编码")
    private boolean isAuto;

    @ApiModelProperty("编码")
    private String code;

    @ApiModelProperty("更新的话 具体的model")
    private T model;

    @ApiModelProperty("增值税率")
    private List<IncrementRate> incrementRate;
    private List<SaleMode> saleMode;
    private List<PriceLvl> priceLvl;

    public BeforeDataModelCust(boolean isAuto, String code, T model) {
        this.isAuto = isAuto;
        this.code = code;
        this.model = model;
    }

    public BeforeDataModelCust(boolean isAuto, String code, T model, List<IncrementRate> incrementRate, List<SaleMode> saleMode, List<PriceLvl> priceLvl) {
        this.isAuto = isAuto;
        this.code = code;
        this.model = model;
        this.incrementRate = incrementRate;
    }

    public static final <TT> BeforeDataModelCust build(boolean isAuto, String code, TT model) {
        return new BeforeDataModelCust(isAuto, code, model);
    }

    public static final <TT> BeforeDataModelCust build(boolean isAuto, String code, TT model, List<IncrementRate> incrementRate, List<SaleMode> saleMode, List<PriceLvl> priceLvl) {
        return new BeforeDataModelCust(isAuto, code, model, incrementRate, saleMode, priceLvl);
    }

    public boolean isAuto() {
        return isAuto;
    }

    public void setAuto(boolean auto) {
        isAuto = auto;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public T getModel() {
        return model;
    }

    public void setModel(T model) {
        this.model = model;
    }

    public List<IncrementRate> getIncrementRate() {
        return incrementRate;
    }

    public void setIncrementRate(List<IncrementRate> incrementRate) {
        this.incrementRate = incrementRate;
    }

    public List<SaleMode> getSaleMode() {
        return saleMode;
    }

    public void setSaleMode(List<SaleMode> saleMode) {
        this.saleMode = saleMode;
    }

    public List<PriceLvl> getPriceLvl() {
        return priceLvl;
    }

    public void setPriceLvl(List<PriceLvl> priceLvl) {
        this.priceLvl = priceLvl;
    }
}
